<template>
  <div class="search-box">
    <form
      class="js-search search-form search-form--modal is-visible"
      method="get"
      action="https://xiaozaiyi.xyz"
      role="search"
    >
      <div class="search-form__inner">
        <div
          ><p class="micro mb-">想要找点什么呢？</p>
          <i
            class="fa fa-search faa-flash animated faa-slow"
            aria-hidden="true"
          ></i>
          <input
            class="t+ext-input"
            type="search"
            name="s"
            placeholder="Search"
            required=""
        /></div>
      </div>
      <div class="search_close" @click="searchHandier"></div>
    </form>
  </div>
</template>

<script setup>
  const emit = defineEmits(['searchHandier'])
  const searchHandier = () => {
    //emit(父组件中的自定义方法,参数一,参数二,...)
    emit('searchHandier', false)
  }
</script>

<style scoped>
  .search-box {
    z-index: 1000;
    background-color: red;
  }
</style>
